package cn.com.aiouyi.service.impl;

import java.util.ArrayList;
import java.util.List;

import org.springframework.stereotype.Service;

import cn.com.aiouyi.entity.PhotoPosition;
import cn.com.aiouyi.page.Filter;
import cn.com.aiouyi.service.PhotoPositionService;
import cn.com.aiouyi.util.AssertUtils;

/**
 * Service - 图片位
 * @author hanson
 *
 */
@Service("photoPositionServiceImpl")
public class PhotoPositionServiceImpl extends BaseServiceImpl<PhotoPosition, Long> implements PhotoPositionService{

	@Override
	public PhotoPosition findByCode(PhotoPosition.Code code) {
		AssertUtils.notNull(code);
		
		List<Filter> filters = new ArrayList<Filter>();
		filters.add(Filter.eq("code", code));
		return this.findOne(filters);
	}
}
